package com.mux.main;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.mux.rpc.TestRegistryService;

public class Consumer {
	 public static void main(String[] args) throws Exception {
	        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"consumer.xml"});
	        context.start();
	 
	        TestRegistryService demoService = (TestRegistryService)context.getBean("testRegistryService"); // 获取远程服务代理
	        String hello = demoService.hello("ccx"); // 执行远程方法
	 
	        System.out.println( hello ); // 显示调用结果
	    }

}
